Fix hashing on big endian platforms (#1028)
authorMilad Fa <46688537+miladfarca@users.noreply.github.com>
Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)
committerBenjamin Barenblat <bbaren@debian.org>
Thu, 14 Apr 2022 17:20:16 +0000 (18:20 +0100)
commit77aa76841be256e76b7d79797938152a73c10c50
tree66cb01a826c4a85f47d65159080e639a4e597dd8
parent9adbd2791c46f7364ffb2fe1c6c3b8cda5357cd9
Fix hashing on big endian platforms (#1028)

Forwarded: https://github.com/abseil/abseil-cpp/pull/1028
Origin: backport, https://github.com/abseil/abseil-cpp/commit/ae0f4c266095c9003786cd571bc1fb72544104a1
Bug-Debian: https://bugs.debian.org/977638

Avoid using libstdc++'s implementation of std::hash<std::bitset> and
std::hash<std::vector> on big endian platforms in the implementation
of absl::Hash.

This is a workaround for a buggy implementation that results in many
collisions.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102531
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98731

Gbp-Pq: Name big-endian-hash2.diff
absl/hash/internal/hash.h
absl/hash/internal/wyhash_test.cc